package baidu.shortpath;

 /**
   * Run_Map_Search.java
   *
   *
   * Created: Fri Dec  1 12:59:33 2000
   *
   * @author <a href="mailto: "Phil Green</a>
   * @version
   
   run a map traversal

 */


public class Run_Map_Search {

  public static void main(String[] arg) {
    
    // create an EasyWriter
    
    EasyWriter screen = new EasyWriter();

    Carta map1= new Carta();
    map1.mapFromFile("map1.txt");
    // screen.println(map1.toString());
    //screen.println(map1.get_Links("Start"));
    
    Map_Search searcher = new Map_Search(map1,"Goal");
    Search_State init_state = (Search_State) new Map_State("Start",0);
    
    //change from search1 - specify strategy
    //String res_df = searcher.run_Search(init_state, "breadth_first");
    //screen.println(res_df);
    //String res_bf = searcher.run_Search(init_state, "depth_first");
    //screen.println(res_bf);
    String res_bb = searcher.run_Search(init_state, "branch_and_bound");
    screen.println(res_bb);
  }
}   










